from django.contrib import admin
from myblog.models import Article


# Register your models here.


class ArticleAdmin(admin.ModelAdmin):
    list_display = ('title', 'pub_date')  # list_display来挑选要显示出来的字段
    search_fields = ['title']
    list_filter = ['category']
    fields = ['title', 'category', 'digest', 'content']


admin.site.register(Article, ArticleAdmin)
admin.site.site_header = '个人博客'
admin.site.site_title = '博客管理'
admin.site.index_title = '欢迎来到后台博客管理'
